vcBitmap
Represents an image file used in the application, for example as material textures.
See in: Overview
Module: vcCore
Parent: vcObject
Children -
Referenced by: vcMaterial.Texture, vcPythonProcessHandler.Icon
Properties
Learn how to use properties here. The properties are also inherited from the parent class.
| Name | Type | Access | Description |
| Format | vcBitmapFormat | R | Gets the format of the bitmap. |
| Height | Integer | R | Gets the height (in pixels) of the bitmap. |
| Name | String | RW | Gets or sets the name of the bitmap. |
| Uri | String | R | Gets the URI of the source file of the bitmap. |
| Width | Integer | R | Gets the width (in pixels) of the bitmap. |
Methods
Learn how to use methods here. The methods are also inherited from the parent class.
| Name | Return Type | Parameters | Description |
| loadBitmap | vcBitmap | String arg | Loads a bitmap image from a given URI.See moreIf loading is successful, the URI filename is used to register the bitmap with the application. Parameters: uri (str): The URI of the bitmap. Exceptions: RuntimeError: When the bitmap cannot be loaded. Returns: vcBitmap: The bitmap. |
| save | None | String uri, Optional Keyword[format = vcBitmapFileFormat] | Saves the bitmap to the given URI.See moreParameters: uri (str): The destination URI. Optional: format (vcBitmapFileFormat): The destination format. Default is vcBitmapFileFormat.BMP. Exceptions: ValueError: When the vcBitmapFileFormat cannot be mapped to a writer module. RuntimeError: When no writer module is found for the given file format. RuntimeError: When the bitmap cannot be saved. |